//
//  BaseNavController.swift
//  weibo
//
//  Created by 谭仁川 on 15/12/4.
//  Copyright © 2015年 itcast. All rights reserved.
//

import UIKit

class BaseNavController: UINavigationController {

    override func viewDidLoad() {
        super.viewDidLoad()

       
    }
    override func pushViewController(viewController: UIViewController, animated: Bool) {
        if childViewControllers.count != 0{
        
        viewController.hidesBottomBarWhenPushed = true
        viewController.navigationItem.backBarButtonItem = UIBarButtonItem(title: "", style: .Plain, target: self, action: "close")
        }
        super.pushViewController(viewController, animated: animated)
    }
    @objc private func back(){
        navigationController?.popViewControllerAnimated(true)
    }


}
